<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateApiDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('api_documents', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('group', 30)
                  ->comment('api所属的分组');   //api所属的分组
            $table->string('name', 30)
                  ->comment('api的名称');       //api的名称
            $table->string('title', 100)
                  ->comment('api名称');         //api名称
            $table->string('descript')
                  ->comment('api的简单描述');   //api的简单描述
            $table->text('detail')
                  ->comment('详细描述');        //api的详细描述
            $table->timestamps();              //创建和更新的时间
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('api_document');
    }
}
